package io.geekidea.boot.auth.service;

import io.geekidea.boot.auth.dto.AppLoginDto;
import io.geekidea.boot.auth.vo.AppLoginVo;
import io.geekidea.boot.auth.vo.LoginTokenVo;
import io.geekidea.boot.shop.entity.Member;

import java.util.Date;

/**
 * @author geekidea
 * @date 2022/7/5
 **/
public interface AppLoginService {

    /**
     * APP小程序登录
     *
     * @param dto
     * @return
     * @throws Exception
     */
    LoginTokenVo login(AppLoginDto dto);


    /**
     * APP登录
     *
     * @param member
     * @return
     * @throws Exception
     */
    LoginTokenVo login(Member member);

    /**
     * 刷新登录信息
     *
     * @param member
     * @param token
     * @param lastLoginTime
     * @return
     * @throws Exception
     */
    AppLoginVo refreshLoginInfo(Member member, String token, Date lastLoginTime);

    /**
     * 获取登录用户信息
     *
     * @return
     * @throws Exception
     */
    AppLoginVo getLoginUserInfo();

    /**
     * 登出
     *
     * @throws Exception
     */
    void logout();

}
